package gestion.horarios.model.jpa.entities;

import java.io.Serializable;
import javax.persistence.*;
import java.sql.Time;
import java.util.List;


/**
 * The persistent class for the franja database table.
 * 
 */
@Entity
@Table(name="franja")
public class Franja implements Serializable {
	private static final long serialVersionUID = 1L;
	private int franjaId;
	private Time horaFin;
	private Time horaInicio;
	private List<FranjaDia> franjadias;

    public Franja() {
    }


	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(unique=true, nullable=false)
	public int getFranjaId() {
		return this.franjaId;
	}

	public void setFranjaId(int franjaId) {
		this.franjaId = franjaId;
	}


	public Time getHoraFin() {
		return this.horaFin;
	}

	public void setHoraFin(Time horaFin) {
		this.horaFin = horaFin;
	}


	public Time getHoraInicio() {
		return this.horaInicio;
	}

	public void setHoraInicio(Time horaInicio) {
		this.horaInicio = horaInicio;
	}


	//bi-directional many-to-one association to FranjaDia
	@OneToMany(mappedBy="franja")
	public List<FranjaDia> getFranjadias() {
		return this.franjadias;
	}

	public void setFranjadias(List<FranjaDia> franjadias) {
		this.franjadias = franjadias;
	}
	
}